package com.sqsf.test;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;

@WebServlet(name = "AllServlet", value = "/*")
public class AllServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        //获取实际请求的uri
        String requestURI = request.getRequestURI();
        System.out.println("requestURI:"+requestURI);

        if(requestURI.equals("/springmvc_jk3/a")) {
            AllController.a();
        }else if(requestURI.equals("/springmvc_jk3/b")){
            AllController.b();
        }else{
            response.getWriter().println("no url !!!");
        }
        //springmvc会基于注解的形式 将上面灵活配置

    }

}